package com.whut.service.impl;

import com.whut.mapper.OrderinfoMapper;
import com.whut.model.Orderinfo;
import com.whut.service.OrderService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("orderinfoService")
public class OrderServiceImpl implements OrderService {
    private static final String ERROR = "error";
    private static final String SUCCESS = "success";
    @Resource
    private OrderinfoMapper orderinfoMapper;


    @Override
    public int addOrderInfo(Orderinfo orderInfo) {
        return orderinfoMapper.insertSelective(orderInfo);
    }

    @Override
    public Object getOrderInfo(int id) {
        return  orderinfoMapper.selectById(id);
    }

    @Override
    public Object deleteCurRow(int mkey) {
        System.out.println(mkey);
        return orderinfoMapper.deleteByPrimaryKey(mkey);
    }
}
